# -*- coding: utf-8 -*-
from odoo import http


class BasicInfo(http.Controller):
    @http.route('/basic_info/basic_info/', auth='public')
    def index(self, **kw):
        return "Hello, world"

    @http.route('/basic_info/basic_info/objects/', auth='public')
    def list(self, **kw):
        return http.request.render('basic_info.listing', {
            'root': '/basic_info/basic_info',
            'objects': http.request.env['basic_info.basic_info'].search([]),
        })

    @http.route('/basic_info/basic_info/objects/<model("basic_info.basic_info"):obj>/', auth='public')
    def object(self, obj, **kw):
        return http.request.render('basic_info.object', {
            'object': obj
        })
